package com.szh.mysobproject.widget

import android.content.Context
import android.util.AttributeSet
import android.widget.FrameLayout
import com.szh.mysobproject.action.StatusAction

/**
 * @author : create by  szh
 * @date : 2022/7/14 10:02
 * @desc :状态布局容器（网络错误，异常错误，空数据）
 */

class StatusContainer @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null) :
    FrameLayout(context, attrs), StatusAction {

    private val mStatusLayout by lazy { StatusLayout(context, attrs) }

    init {
        addView(mStatusLayout)
    }

    override fun getStatusLayout(): StatusLayout = mStatusLayout
}